package cn.audit.repository.zqmk;

import cn.audit.bean.pojo.Message;
import cn.audit.bean.dto.zuzhangzhengshuai;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @Author: 钟琪
 * @Date: 2019/5/29 22:36
 */
public interface MessageRepository extends JpaRepository<Message,Integer>,JpaSpecificationExecutor<Message> {
    @Query("select new cn.audit.bean.dto.zuzhangzhengshuai(u,m) " +
            "FROM User u,Message m " +
            "where m.senderid=u.id ")
    List<zuzhangzhengshuai> selsectByAll();
}
